
const VIEW = Symbol('VIEW');
const WORLD = Symbol('WORLD');
const VIEWFULL = Symbol('VIEWFULL');
const WORLDFULL = Symbol('WORLDFULL');
export default class UtilsCoordinateConter {

    static [VIEW]() {
        let Vwc = window.localStorage.getItem('view-width') ? window.localStorage.getItem('view-width') / 2 : 375 / 2;
        let Vhc = window.localStorage.getItem('view-height') ? window.localStorage.getItem('view-height') / 2 : 667 / 2;
        return {
            VWC: Vwc,
            VHC: Vhc
        }
    }

    static [WORLD]() {
        let Wwc = window.localStorage.getItem('world-width') ? window.localStorage.getItem('world-width') / 2 : 1000 / 2;
        let Whc = window.localStorage.getItem('world-height') ? window.localStorage.getItem('world-height') / 2 : 1000 / 2;
        return {
            WWC: Wwc,
            WHC: Whc
        }
    }

    static [VIEWFULL]() {
        let VFw = window.localStorage.getItem('view-width') ? window.localStorage.getItem('view-width') : 375;
        let VFh = window.localStorage.getItem('view-height') ? window.localStorage.getItem('view-height') : 667;
        return {
            VFW: VFw,
            VFH: VFh
        }
    }

    static [WORLDFULL]() {
        let WFw = window.localStorage.getItem('world-width') ? window.localStorage.getItem('world-width')  : 1000;
        let WFh = window.localStorage.getItem('world-height') ? window.localStorage.getItem('world-height') : 1000;
        return {
            WFW: WFw,
            WFH: WFh
        }
    }

    static coordinatrConter(_type) {
        switch (_type) {
            case 'view':
                return this[VIEW]();
            case 'world':
                return this[WORLD]();
            case 'viewFull':
                return this[VIEWFULL]();
            case 'worldFull':
                return this[WORLDFULL]();
        }
    }

}